// 构造方法
function People(name, age){
  // 实例属性
  this.name = name
  this.age = age

  // 不推荐
  this.showName = function() {
    console.log('my name is', this.name)
  }
  console.log(this)
  People.count++
}
// 静态属性
People.count = 0

// 静态方法
People.getCount = () => {
  return People.count
}

// ES5 定义类方法 实例方法
People.prototype.showAge = function(){
  console.log('我的年龄' + this.age)
}

let p1 = new People('aqie', 18)
console.log(p1)

p1.showName()
p1.showAge()

// 静态属性 静态方法
let str = new String('aqie')
let arr = new Array(1,2,3)
console.log(arr)

console.log(Math.max(3, 4), People.count, People.getCount())